<?php
namespace App\Lib\PHPExcel\ManuOrder;

use App\Lib\PHPExcel\ExcelHandle;

class TaobaoOrderUsers extends ExcelHandle
{
    /*
     *退货订单
     * */
    public function arrange($origin_arr)
    {

        $arr = [
            0 => [
                '实际支付金额','订单数','头条昵称','用户', '电话','地址', '首次购买时间','最后购买时间']
        ];
        $i = 1;
        foreach ($origin_arr as $data) {
            $arr[$i]['实际支付金额'] = $data['actual_payment_amount'];
            $arr[$i]['订单数'] = $data['number'];
            $arr[$i]['头条昵称'] = $data['nickname'];
            $arr[$i]['用户'] = $data['post_recevier'];
            $arr[$i]['电话'] = $data['post_tel'];
            $arr[$i]['地址'] = $data['post_address'];
            $arr[$i]['首次购买时间'] = $data['first_time'];
            $arr[$i]['最后购买时间'] = $data['last_time'];
            $i++;
        }

        return $arr;
    }


}